<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<%@page import="com.mall.app.utils.MyAccount"%>
<%@page import="org.apache.shiro.SecurityUtils"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>家居商城-购物车</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../layui/css/layui.css">
<link rel="stylesheet" href="../static/css/index.css">
<script src="../layui/layui.js"></script>
</head>
<body>
	<!-- <script src="../layui/layui.js"></script> -->
	<%
			MyAccount account = (MyAccount)SecurityUtils.getSubject().getSession().getAttribute("account");
			if(account==null) {
				response.sendRedirect("login.jsp");
				return;
			}
			%>
	<input type="hidden" id="a" name="bid" value="<%=account.getId()%>" />

	<div class="house-header">
		<div class="layui-container">
			<div class="house-nav">
				<span class="layui-breadcrumb" lay-separator="|"> <shiro:authenticated>
						<a href="#">欢迎您，[<shiro:principal />]
						</a>
						<a href="../logout">注销</a>
					</shiro:authenticated> <shiro:notAuthenticated>
						<a href="login.jsp">登录 </a>
					</shiro:notAuthenticated> 
					<a href="myOrder.jsp">我的订单</a> 
				</span> <span class="layui-breadcrumb house-breadcrumb-icon"
					lay-separator=" "> <a id="search"><i
						class="layui-icon layui-icon-house-find"></i></a> <a href="login.html"><i
						class="layui-icon layui-icon-username"></i></a> <a
					href="usershop.html"><i
						class="layui-icon layui-icon-house-shop"></i></a>
				</span>
			</div>
			<div class="house-banner layui-form">
				<a class="banner" href="../index.jsp"> <img
					src="../static/img/banner.png" alt="家居商城">
				</a>
				<div class="layui-input-inline">
					<input type="text" placeholder="搜索好物" class="layui-input"><i
						class="layui-icon layui-icon-house-find"></i>
				</div>
				<!-- 购物车图标 -->
				<a class="shop" href="cartList.jsp"><i
					class="layui-icon layui-icon-house-shop"></i><!-- <span
					class="layui-badge"></span> --></a>
			</div>
			<ul class="layui-nav close">
				<li class="layui-nav-item layui-this"><a href="../index.jsp">首页</a></li>
				<li class="layui-nav-item"><a href="list.jsp">居家用品</a></li>
			</ul>
			<button id="switch">
				<span></span><span class="second"></span><span class="third"></span>
			</button>
		</div>
	</div>

	<div class="layui-container house-usershop">

		<table id="house-usershop-table" lay-filter="house-usershop-table"></table>
		<div class="house-usershop-table-num layui-form">
			<input type="checkbox" lay-skin="primary"><span class="numal">已选
				0 件</span> <a id="batchDel">批量删除</a>
			<p id="total">
				合计: ￥<span>0.00</span>
			</p>
			<div id="toCope">
				<p>
					应付：<big>￥0.00</big>
				</p>
				<span>满减￥20，包邮</span>
			</div>
			<button class="layui-btn" id="clear">结算</button>
		</div>
		<p>猜您喜欢</p>
		<ul class="house-usershop-like">
			<li><a href="detail.html">
					<div>
						<img src="../static/img/paging_img5.jpg">
					</div>
					<p>可爱小瓷杯子</p>
					<p class="price">￥200</p>
			</a></li>
			<li><a href="detail.html">
					<div>
						<img src="../static/img/paging_img6.jpg">
					</div>
					<p>陶瓷面不粘锅</p>
					<p class="price">￥200</p>
			</a></li>
			<li><a href="detail.html">
					<div>
						<img src="../static/img/paging_img5.jpg">
					</div>
					<p>可爱小瓷杯子</p>
					<p class="price">￥200</p>
			</a></li>
			<li><a href="detail.html">
					<div>
						<img src="../static/img/paging_img6.jpg">
					</div>
					<p>陶瓷面不粘锅</p>
					<p class="price">￥200</p>
			</a></li>
			<li><a href="detail.html">
					<div>
						<img src="../static/img/paging_img5.jpg">
					</div>
					<p>可爱小瓷杯子</p>
					<p class="price">￥200</p>
			</a></li>
		</ul>
	</div>

	<div class="house-footer">
		<div class="layui-container">
			<div class="intro">
				<span class="first"><i
					class="layui-icon layui-icon-house-shield"></i>7天无理由退换货</span> <span
					class="second"><i class="layui-icon layui-icon-house-car"></i>满99元全场包邮</span>
				<span class="third"><i
					class="layui-icon layui-icon-house-diamond"></i>100%品质保证</span> <span
					class="last"><i class="layui-icon layui-icon-house-tel"></i>客服400-2888-966</span>
			</div>
			<div class="about">
				<span class="layui-breadcrumb" lay-separator="|"> <a
					href="about.html">关于我们</a> <a href="about.html">帮助中心</a> <a
					href="about.html">售后服务</a> <a href="about.html">配送服务</a> <a
					href="about.html">关于货源</a>
				</span>
				<p>家居商城版权所有 &copy; 2012-2020</p>
			</div>
		</div>
	</div>

	<!-- ****************************下面的js均有改动***************************** -->
	<script type="text/html" id="goodsTpl">
	<p>{{d.goods.gname}}</p>

</script>
	<script type="text/html" id="priceTpl">
 <p><span class="price">{{d.goods.price}}</span></p>
</script>
	<script type="text/html" id="numTpl">
  <div class="numVal">
    <input type="text" class="layui-input" value="{{d.quantity}}">
  </div>
</script>
	<script type="text/html" id="totalTpl">
  <span class="total" style="color: #cd2d15;">￥{{(d.goods.price*d.quantity).toFixed(2)}}</span>
</script>
	<script type="text/html" id="shopTpl">
  <a lay-event="del">删除</a>
</script>
	<!-- ******************************上面的js有改动*************************************** -->

	<script src="../layui/layui.js"></script>
	<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
	<!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
	<script>
  layui.config({
    base: '../static/js/' 
  }).use('house'); 
</script>

</body>
</html>